package demo.vo;

import java.io.Serializable;


/**
 * @author mandy.hu
 *
 */
public class LogStatModel implements Serializable{

	private static final long serialVersionUID = 1L;
	private String app;
	private String hostName;
	private String level;
	private String logIdentity;
    private String serviceId;
	private Long   timestamp;
	private String eventType;
	private String logClassifyType;//取值：db、redis、zk、rabbitmq、mainstay、oom、other

	public String getEventType() {
		return eventType;
	}

	public void setEventType(String eventType) {
		this.eventType = eventType;
	}

	/**
	 * @return the app
	 */
	public String getApp() {
	
		return app;
	}

	
	/**
	 * @param app the app to set
	 */
	public void setApp(String app) {
	
		this.app = app;
	}


	/**
	 * @return the hostName
	 */
	public String getHostName() {
	
		return hostName;
	}


	/**
	 * @param hostName the hostName to set
	 */
	public void setHostName(String hostName) {
	
		this.hostName = hostName;
	}

	/**
	 * @return the level
	 */
	public String getLevel() {
	
		return level;
	}

	
	/**
	 * @param level the level to set
	 */
	public void setLevel(String level) {
	
		this.level = level;
	}


	/**
	 * @return the logIdentity
	 */
	public String getLogIdentity() {
	
		return logIdentity;
	}


	/**
	 * @param logIdentity the logIdentity to set
	 */
	public void setLogIdentity(String logIdentity) {
	
		this.logIdentity = logIdentity;
	}


	/**
	 * @return the serviceId
	 */
	public String getServiceId() {
	
		return serviceId;
	}


	/**
	 * @param serviceId the serviceId to set
	 */
	public void setServiceId(String serviceId) {
	
		this.serviceId = serviceId;
	}

	
	/**
	 * @return the timestamp
	 */
	public Long getTimestamp() {
	
		return timestamp;
	}


	/**
	 * @param timestamp the timestamp to set
	 */
	public void setTimestamp(Long timestamp) {
	
		this.timestamp = timestamp;
	}

	public String getLogClassifyType() {
		return logClassifyType;
	}

	public void setLogClassifyType(String logClassifyType) {
		this.logClassifyType = logClassifyType;
	}


	public String getReduceKey() {
		StringBuilder stringBuilder = new StringBuilder();
		stringBuilder.append(this.app);
		stringBuilder.append("|");
		stringBuilder.append(this.hostName);
		stringBuilder.append("|");
		stringBuilder.append(this.level);
		stringBuilder.append("|");
		stringBuilder.append(this.logIdentity);
		stringBuilder.append("|");
		stringBuilder.append(this.serviceId);
		stringBuilder.append("|");
		stringBuilder.append(this.logClassifyType);

		return stringBuilder.toString();
	}
	

}
